package com.simple.upms.api.feign;

import com.simple.common.core.constant.ServiceNameConstants;
import com.simple.common.core.util.R;
import com.simple.upms.api.dto.UserInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * feign 用户服务
 *
 * @author Administrator
 * @date 2021/01/04 14:33:10
 */
@FeignClient(contextId = "remoteUserService",value = ServiceNameConstants.UPMS_SERVICE

)
public interface RemoteUserService {
    /**
     *  根据用户名获取用户的基本信息、权限信息及角色信息
     *
     * @param userName 用户名
     * @return {@link R<UserInfo>}
     */
    @GetMapping("/user/info/{userName}")
    R<UserInfo> info(@PathVariable String userName);
}
